Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(router): Remove barrel exports from router.tsx #10464

Merged
merged 5 commits into from
Apr 16, 2024

Conversation

Tobbe
Copy link
Member

@Tobbe Tobbe commented Apr 16, 2024

We were using both index.ts and router.tsx as barrel export files. We should move away from barrel exports at some point, and we definitely don't need two files doing it in the same package. Everything that was exported from
router.tsx is already exported by other files (except Router itself). So I updated the code to import from there directly instead.

This is a breaking change for anyone who does import ... from '@redwoodjs/router/dist/router' in their project. Which hopefully isn't very many.

  • The quick fix is to find the original export and pull from there instead
  • The real fix is to talk to us on the core team and see if we can provide an official way of solving it instead of relying on internal implementation details 🙂

@Tobbe Tobbe added the release:breaking This PR is a breaking change label Apr 16, 2024
@Tobbe Tobbe added this to the next-release-major milestone Apr 16, 2024
@Tobbe Tobbe merged commit ab68861 into redwoodjs:main Apr 16, 2024
46 checks passed
@Tobbe Tobbe deleted the tobbe-router-clean-up-exports branch April 16, 2024 09:38
dac09 added a commit to dac09/redwood that referenced this pull request Apr 16, 2024
…od into feat/gql-auth-context-cookie

* 'feat/gql-auth-context-cookie' of github.com:dac09/redwood:
  fix(router): Remove barrel exports from router.tsx (redwoodjs#10464)
dac09 added a commit that referenced this pull request Apr 16, 2024
…-dbauth-middleware

* 'main' of github.com:redwoodjs/redwood:
  chore(location): Accept URL-like object (#10467)
  fix(router): Remove barrel exports from router.tsx (#10464)
  chore(dbauth-mw): Refactor web side dbAuth creation (#10460)
  chore(router): Prevent circular dependency for namedRoutes (#10463)
  chore(router): route-validators: Better types and clean up comments (#10462)
  feat(server-auth): dbAuth 3/3 -  handle login, logout, signup, etc. requests if forwarded from middleware (#10457)
  docs(router): Document new NavLink className replacement behavior (#10401)
  chore(refactor): Split the router out into smaller logical units (#10434)
  feat(server-auth): Part 1/3: dbAuth middleware support (web side changes) (#10444)
  chore(auth): Build: Put ESM at the root, and CJS in /cjs (#10458)
  fix(ssr): Successfully serve static assets like `favicon.png` (#10455)
  chore(deps): update chore (#10367)
  (docs) Fix useCache headers and links (#10451)
  chore: remove aws-lambda (#10450)
  chore(deps): update dependency typescript to v5.4.5 (#10452)
  feat(og-gen): Update implementation of useLocation | Update App template (#10441)
  feat(og-gen): Adds package and vite plugin for dynamic og generation (#10439)
dac09 added a commit to dac09/redwood that referenced this pull request Apr 18, 2024
* 'main' of github.com:redwoodjs/redwood:
  Revert "chore(location): Accept URL-like object" (redwoodjs#10473)
  RSC: Be consistent about inlining rollup input (redwoodjs#10472)
  chore(paths): Remove outdated comment (redwoodjs#10471)
  feat(server-auth): Update getAuthenticationContext to support cookies and tokens both (redwoodjs#10465)
  chore(location): Accept URL-like object (redwoodjs#10467)
  fix(router): Remove barrel exports from router.tsx (redwoodjs#10464)
  chore(dbauth-mw): Refactor web side dbAuth creation (redwoodjs#10460)
  chore(router): Prevent circular dependency for namedRoutes (redwoodjs#10463)
  chore(router): route-validators: Better types and clean up comments (redwoodjs#10462)
  feat(server-auth): dbAuth 3/3 -  handle login, logout, signup, etc. requests if forwarded from middleware (redwoodjs#10457)
  docs(router): Document new NavLink className replacement behavior (redwoodjs#10401)
  chore(refactor): Split the router out into smaller logical units (redwoodjs#10434)
  feat(server-auth): Part 1/3: dbAuth middleware support (web side changes) (redwoodjs#10444)
  chore(auth): Build: Put ESM at the root, and CJS in /cjs (redwoodjs#10458)
  fix(ssr): Successfully serve static assets like `favicon.png` (redwoodjs#10455)
  chore(deps): update chore (redwoodjs#10367)
  (docs) Fix useCache headers and links (redwoodjs#10451)
  chore: remove aws-lambda (redwoodjs#10450)
  chore(deps): update dependency typescript to v5.4.5 (redwoodjs#10452)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:breaking This PR is a breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants